package com.aspose.cells;

import java.util.ArrayList;
import java.util.Iterator;

class zcei {
   private zok a;
   private Workbook b;
   private WorksheetCollection c;
   private com.aspose.cells.b.a.d.zh d;
   private zcel e;

   zcei(zcel var1, zok var2) throws Exception {
      this.e = var1;
      this.a = var2;
      this.b = var2.a;
      this.c = this.b.getWorksheets();
      this.d = new com.aspose.cells.b.a.d.zh();
   }

   void a(String var1, com.aspose.cells.a.f.zj var2) throws Exception {
      this.a();
      zcel.a(var1, this.d, var2);
      this.d.a();
      this.d = null;
   }

   private void a() throws Exception {
      zcdb var1 = new zcdb(131);
      var1.a(this.d);
      zcca var2 = new zcca();
      var2.a(this.d);
      if (this.b.getSettings().isWriteProtected()) {
         zdi var3 = new zdi(this.b);
         var3.a(this.d);
      }

      zcef var6 = new zcef();
      var6.a(this.b);
      var6.a(this.d);
      this.g();
      this.e();
      this.f();
      zdh var4 = new zdh(this.b.getSettings());
      var4.a(this.d);
      this.b();
      this.h();
      this.i();
      this.d();
      this.c();
      zcdb var5 = new zcdb(132);
      var5.a(this.d);
   }

   private void b() throws Exception {
      zne var1 = this.c.f;
      if (var1 != null && var1.getCount() != 0) {
         Iterator var2 = var1.iterator();

         while(var2.hasNext()) {
            znd var3 = (znd)var2.next();
            zdr var4 = new zdr(var3);
            var4.a(this.d);
         }

      }
   }

   private void c() throws Exception {
      ArrayList var1 = this.a.A;
      if (var1 != null && var1.size() > 0) {
         zbzn var2 = new zbzn();
         var2.a(this.d);
         zcdb var3 = new zcdb(1070);
         var3.a(this.d);

         for(int var4 = 0; var4 < var1.size(); ++var4) {
            zqk var5 = (zqk)var1.get(var4);
            zbzf var6 = new zbzf(var5.a);
            var6.a(this.d);
            zcdb var7 = new zcdb(1073);
            var7.a(this.d);
         }

         zcdb var8 = new zcdb(1071);
         var8.a(this.d);
         zcdb var9 = new zcdb(36);
         var9.a(this.d);
      }

   }

   private void a(com.aspose.cells.b.a.d.zh var1, String var2, String var3) throws Exception {
      zbyz var4 = new zbyz(var2, var3);
      var4.a(var1);
      zcdb var5 = new zcdb(387);
      var5.a(var1);
   }

   private void d() throws Exception {
      if (this.a.h != null) {
         zcdb var1 = new zcdb(384);
         var1.a(this.d);
         ArrayList var2 = this.a.h;
         if (var2 != null) {
            Iterator var3 = var2.iterator();

            while(var3.hasNext()) {
               zqc var4 = (zqc)var3.next();
               this.a(this.d, var4.c, var4.e);
            }
         }

         zcdb var5 = new zcdb(385);
         var5.a(this.d);
      }
   }

   private void e() throws Exception {
      zcdb var1 = new zcdb(135);
      var1.a(this.d);
      zbya var2 = new zbya();
      var2.a(this.b);
      var2.a(this.d);
      zcdb var3 = new zcdb(136);
      var3.a(this.d);
   }

   private void f() throws Exception {
      zcdb var1 = new zcdb(143);
      var1.a(this.d);

      for(int var2 = 0; var2 < this.a.c.size(); ++var2) {
         zol var3 = (zol)this.a.c.get(var2);
         zcaq var4 = new zcaq();
         var4.a(var3, var3.a.l());
         var4.a(this.d);
      }

      zcdb var5 = new zcdb(144);
      var5.a(this.d);
   }

   private void g() throws Exception {
      if (this.b.getWorksheets().P()) {
         zceg var1 = new zceg(this.b.getWorksheets().N());
         var1.a(this.d);
      }
   }

   private void h() throws Exception {
      zcdb var1 = new zcdb(353);
      var1.a(this.d);
      zbqf var2 = this.c.v();

      for(int var3 = 0; var3 < var2.getCount(); ++var3) {
         zbqg var4 = var2.a(var3);
         switch(var4.a()) {
         case 0:
            this.a(var3);
            break;
         case 1:
            zcdb var5 = new zcdb(357);
            var5.a(this.d);
            break;
         case 2:
            zcdb var8 = new zcdb(667);
            var8.a(this.d);
            ArrayList var9 = var4.b();
            if (var9.size() != 0) {
               this.a(var9);
            }
         case 3:
         default:
            break;
         case 4:
            this.a(var3);
            break;
         case 5:
            zcdb var6 = new zcdb(358);
            var6.a(this.d);
            ArrayList var7 = var4.b();
            if (var7.size() != 0) {
               this.a(var7);
            }
         }
      }

      zbzm var10 = new zbzm(this.c);
      var10.a(this.d);
      zcdb var11 = new zcdb(354);
      var11.a(this.d);
   }

   private void a(ArrayList var1) throws Exception {
      for(int var2 = 0; var2 < var1.size(); ++var2) {
         zuk var3 = (zuk)var1.get(var2);
         zccx var4 = new zccx(var3);
         var4.a(this.d);
      }

   }

   private void a(int var1) throws Exception {
      if (this.a.t.size() > 0) {
         zbqf var2 = this.a.a.getWorksheets().v();
         zqe var3 = (zqe)this.a.t.get(var1);
         if (var3 != null) {
            zcdr var4 = new zcdr(var3.c);
            var4.a(this.d);
         }
      }

   }

   private void i() throws Exception {
      NameCollection var1 = this.b.getWorksheets().getNames();
      Iterator var2 = var1.iterator();

      while(var2.hasNext()) {
         Name var3 = (Name)var2.next();
         zccn var4 = new zccn();
         var4.a(var3);
         var4.a(this.d);
      }

   }
}
